package com.example.dubbotest.web.controller;

import com.alibaba.dubbo.config.annotation.Reference;
import com.example.dubbotest.api.HelloService;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;
import java.util.Map;

/**
 * Created by TJ on 2017/8/10.
 */
@RestController
public class MainController {

    @Reference
    HelloService helloService;

    @RequestMapping
    public String test(){
        return helloService.tellMe();
    }

    @RequestMapping("/all")
    public List<Map<String,Object>> listAllUser() throws Exception {
        return helloService.listAll();
    }

}
